﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SAM_Edu.entity;
using SAM_Edu.dao;

namespace SAM_Edu.control
{
    public class UpdateUser
    {

        public static bool UpdateAccountInformation(string username,string password , string securityQN, string securityAns , string rfidNo)
        {


            bool status  = daoAccounts.UpdateAccountDetails(username,password,securityQN,securityAns,rfidNo);
            return status;

        }
        public static bool UpdateUserInformation(string fullname,string email, int ccode, int areacode, int mobileno, int uid)
        {


            bool status = daoUser.UpdateUserDetails(fullname,email,ccode,areacode,mobileno , uid);
            return status;

        }

        public static User getUserInformation(int userid)
        {


            User user = daoUser.getUserDetails(userid);
            return user;

        }

        public static Accounts getAccountInformation(string username)
        {


            Accounts acc = daoAccounts.getAccountDetails(username);
            return acc;

        }
    }
}
